package com.yunke.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * VIP购买订单实体类
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@TableName("yunke_level_order")
@Schema(description = "VIP购买订单")
public class YunkeLevelOrder {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    /**
     * 订单号
     */
    @Schema(description = "订单号")
    private String orderNo;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * VIP等级ID
     */
    @Schema(description = "VIP等级ID")
    private Long levelId;

    /**
     * 等级名称
     */
    @Schema(description = "等级名称")
    private String levelName;

    /**
     * 购买类型：1-月费 2-季费 3-年费
     */
    @Schema(description = "购买类型")
    private Integer buyType;

    /**
     * 购买时长（月）
     */
    @Schema(description = "购买时长（月）")
    private Integer duration;

    /**
     * 原价
     */
    @Schema(description = "原价")
    private BigDecimal originalPrice;

    /**
     * 实付金额
     */
    @Schema(description = "实付金额")
    private BigDecimal payAmount;

    /**
     * 优惠金额
     */
    @Schema(description = "优惠金额")
    private BigDecimal discountAmount;

    /**
     * 优惠券ID
     */
    @Schema(description = "优惠券ID")
    private Long couponId;

    /**
     * 优惠券代码
     */
    @Schema(description = "优惠券代码")
    private String couponCode;

    /**
     * 支付方式：1-余额支付 2-微信支付 3-支付宝支付
     */
    @Schema(description = "支付方式")
    private Integer payMethod;

    /**
     * 支付状态：1-待支付 2-已支付 3-已取消 4-已退款
     */
    @Schema(description = "支付状态")
    private Integer payStatus;

    /**
     * 第三方订单号
     */
    @Schema(description = "第三方订单号")
    private String thirdOrderNo;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    private Long startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间")
    private Long endTime;

    /**
     * 激活时间
     */
    @Schema(description = "激活时间")
    private Long activeTime;

    /**
     * 支付时间
     */
    @Schema(description = "支付时间")
    private Long payTime;

    /**
     * 退款时间
     */
    @Schema(description = "退款时间")
    private Long refundTime;

    /**
     * 退款金额
     */
    @Schema(description = "退款金额")
    private BigDecimal refundAmount;

    /**
     * 退款原因
     */
    @Schema(description = "退款原因")
    private String refundReason;

    /**
     * 是否自动续费：0-否 1-是
     */
    @Schema(description = "是否自动续费")
    private Integer isAutoRenew;

    /**
     * 订单来源：1-用户购买 2-系统赠送 3-活动奖励 4-卡密兑换
     */
    @Schema(description = "订单来源")
    private Integer orderSource;

    /**
     * 备注信息
     */
    @Schema(description = "备注信息")
    private String remark;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Long createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Long updateTime;
} 